const express = require('express')
const bodyParser = require("body-parser")
const homeRouter = require('./routes/home')
require("./model/connect")

const app = express();
app.use(bodyParser.urlencoded({extended:false}))

app.use(bodyParser.json())

app.use(express.static("./public"))

app.set("views","./views")

app.set("view engine",'ejs')



// 使用路由

app.use(homeRouter)
app.listen(3000,()=>{console.log("启动了")})